package com.innovation.chengzhangriji.ui;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;

import com.innovation.chengzhangriji.R;
import com.innovation.chengzhangriji.ui.widget.CuteToolbar;

public class NewDiaryActivity extends BaseActivity implements CuteToolbar.OnClickCuteToolbarListener{
    private ImageView iv_ready,iv_ing,iv_bir;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_new_diary);
        CuteToolbar toolbar = (CuteToolbar) findViewById(R.id.new_diary_cutetoolbar);
        toolbar.setOnClickCuteToolbarListener(this);
        toolbar.getBackground().setAlpha(230);
        init();
    }
    private void init(){
        iv_ready = (ImageView) findViewById(R.id.iv_ready);
        iv_ready.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(NewDiaryActivity.this, NewDiaryDetailActivity.class);
                intent.putExtra("type", 0);
                startActivity(intent);
            }
        });
        iv_ing = (ImageView) findViewById(R.id.iv_ing);
        iv_ing.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(NewDiaryActivity.this, NewDiaryDetailActivity.class);
                intent.putExtra("type", 1);
                startActivity(intent);
            }
        });
        iv_bir = (ImageView) findViewById(R.id.iv_bir);
        iv_bir.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(NewDiaryActivity.this, NewDiaryDetailActivity.class);
                intent.putExtra("type", 2);
                startActivity(intent);
            }
        });
    }

    @Override
    public void onClickLeft() {
        onBackPressed();
    }

    @Override
    public void onClickRight() {

    }

}
